-
-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ConfigureHtmlRenderer to MarkdownPipelineBuilder #802
base: master
Are you sure you want to change the base?
Conversation
Thanks. It looks ok at a quick glance. |
Great, I'll see if I can find the time to flesh it out with more properties and renderers. |
So I added builders for all kinds of renderers along with all fields. I also added doc comments and updated some tests. Now, I'm not 100% sure all those fields should be available through the builder. In particular the I'm also not 100% sure all those renderers should be available through the builder at either so let me know if any of them shouldn't and I'll have them removed. |
A couple observations:
|
Indeed, seeing more changes coming, I agree the points from @MihaZupan |
I needed to set up image url rewriting in a project of mine and found it a bit tedious not having a way to set it up in the pipeline. So I added the ability to configure the
HtmlRenderer
from the pipeline builder. As an added bonus, this works with the renderer cache as well.I did not add any tests but updated the BaseUrl test to configure the html renderer using the pipeline builder.
I did not update changelog.md since it already has been neglected for some time.
I have not spent any time figuring out whether any of the documentation should be updated, please advise.
I could not find any existing PR or issue on this exact issue so I took the liberty to raise this draft PR.
UPDATE:
I added a bare bones builder for HtmlRenderer letting me set the one field I need as a POC. It is basically a factory for
TextRendererBase
which I also refactored the cache mechanism to use so that too should work for any text renderer. This goes for theToHtml
method since it uses the caching mechanism to get hold of its renderer.